def isPhoneNum(text):
    if len(text) != 12:
        return False
    for i in range(0, 3):
        if not text[i].isdecimal():
            return False
    if text[3] != '-':
        return False
    for i in range(4, 7):
        if not text[i].isdecimal():
            return False
    if text[7] != '-':
        return False
    for i in range(8, 12):
        if not text[i].isdecimal():
            return False
    return True

print('422-456-5633 is a phone number: ')
print(isPhoneNum('422-456-5633'))
print('42b-45c-5a33 is a phone number: ')
print(isPhoneNum('42b-45c-5a33'))
print('hhhhhhhhhhhh is a phone number: ')
print(isPhoneNum('hhhhhhhhhhhh'))

message = 'Call me at 415-555-7973 tomorrow. 234-435-3458 is my office.'
for i in range(len(message)):
    chunk = message[i:i+12]
    # print(chunk)
    if isPhoneNum(chunk):
        print('Phone number found: ' + chunk)
print('Done.')
